package com.lzy.cloud.goods.service.GoodsServiceImpl;

import com.lzy.cloud.goods.dtos.OvertimeBillingDto;
import com.lzy.cloud.goods.dtos.TimeDto;
import com.lzy.cloud.goods.entity.OvertimeBilling;
import com.lzy.cloud.goods.mapper.OvertimeBillingMapperExt;
import com.lzy.cloud.goods.service.OvertimeBillingService;
import com.lzy.framework.core.utils.DozerUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 商品超时计费
 *
 * @author lc
 * @version 2018/8/6
 */
@Service
public class OvertimeBillingServiceImpl implements OvertimeBillingService {

    @Autowired
    private OvertimeBillingMapperExt overtimeBillingMapperExt;

    @Override
    public Boolean addOvertimeBilling(OvertimeBillingDto overtimeBillingDto) {
        return overtimeBillingMapperExt.insertSelective(DozerUtils.map(overtimeBillingDto,OvertimeBilling.class))>0;
    }

    @Override
    public List<OvertimeBillingDto> selectList(OvertimeBillingDto overtimeBillingDto) {
        return overtimeBillingMapperExt.selectList(overtimeBillingDto);
    }

    @Override
    public Boolean delRepeat(OvertimeBillingDto overtimeBillingDto) {
        return overtimeBillingMapperExt.delRepeat(overtimeBillingDto)>0;
    }
}
